home *** CD-ROM | disk | FTP | other *** search
/ CD Fun House 8 / CD Funhouse Version 8.0 - Wayzata Technology (7013) (1993).iso / pc / mac / __cd_fun / __sports / hyperfoo.00 / stack.txt < prev   
Text File  |  1990-10-03  |  18KB  |  775 lines

  1. -- stack: in.00
  2. -- format: 8 (HyperCard 1)
  3. -- flags: 0x1000 (none)
  4. -- protect password hash: 0
  5. -- maximum user level: 2 (typing)
  6. -- window: Rect(x1=0, y1=0, x2=0, y2=0)
  7. -- screen: Rect(x1=0, y1=0, x2=0, y2=0)
  8. -- card dimensions: w=0 h=0
  9. -- scroll: x=0 y=0
  10. -- background count: 3
  11. -- first background id: 2687
  12. -- card count: 10
  13. -- first card id: 7419
  14. -- list block id: 8809
  15. -- print block id: 3438
  16. -- font table block id: 0
  17. -- style table block id: 0
  18. -- free block count: 0
  19. -- free size: 0 bytes
  20. -- total size: 107392 bytes
  21. -- stack block size: 30208 bytes
  22. -- created by hypercard version: 0x01208000
  23. -- compacted by hypercard version: 0x01228000
  24. -- modified by hypercard version: 0x01228000
  25. -- opened by hypercard version: 0x01228000
  26. -- patterns[0]: 0x0000000000000000
  27. -- patterns[1]: 0x0000220000002200
  28. -- patterns[2]: 0x8800220088002200
  29. -- patterns[3]: 0xCC003300CC003300
  30. -- patterns[4]: 0xCC883322CC883322
  31. -- patterns[5]: 0xEE88BB22EE88BB22
  32. -- patterns[6]: 0xEECCBB33EECCBB33
  33. -- patterns[7]: 0xFFCCFF33FFCCFF33
  34. -- patterns[8]: 0xFFEEFFBBFFEEFFBB
  35. -- patterns[9]: 0xFFFFFFBBFFFFFFBB
  36. -- patterns[10]: 0x8010022001084004
  37. -- patterns[11]: 0xFFFFFFFFFFFFFFFF
  38. -- patterns[12]: 0x8822882288228822
  39. -- patterns[13]: 0x1122448811224488
  40. -- patterns[14]: 0xC4800C6843023026
  41. -- patterns[15]: 0xB130031BD8C00C8D
  42. -- patterns[16]: 0xAA00AA00AA00AA00
  43. -- patterns[17]: 0x8822552288225522
  44. -- patterns[18]: 0x8855225588552255
  45. -- patterns[19]: 0x77DD77DD77DD77DD
  46. -- patterns[20]: 0xDB6DB6DB6DB6DB6D
  47. -- patterns[21]: 0xAA55AA55AA55AA55
  48. -- patterns[22]: 0x038448300C020101
  49. -- patterns[23]: 0x8244394482010101
  50. -- patterns[24]: 0x8814224188412214
  51. -- patterns[25]: 0x8080413E080814E3
  52. -- patterns[26]: 0x22048C7422179810
  53. -- patterns[27]: 0xBE808808EB088880
  54. -- patterns[28]: 0x25C8328964244C92
  55. -- patterns[29]: 0xA29C41BE2AC914EB
  56. -- patterns[30]: 0x40A00000040A0000
  57. -- patterns[31]: 0x8040200002040800
  58. -- patterns[32]: 0xAA00800088008000
  59. -- patterns[33]: 0xFF80808080808080
  60. -- patterns[34]: 0x081C22C180010204
  61. -- patterns[35]: 0xFF808080FF080808
  62. -- patterns[36]: 0xF87422478F172271
  63. -- patterns[37]: 0xBF00BFBFB0B0B0B0
  64. -- patterns[38]: 0xFF7FBE5DA2418000
  65. -- patterns[39]: 0xFAF5FAF5A050A050
  66. -- checksum: 0x0
  67. ----- HyperTalk script -----
  68. on Runplay
  69.   global kick, players, post, qtr, ty
  70.  
  71.   go to card 5
  72.   XFootball (ty*3)+106,(ty*3)+106
  73.   if players=1 then
  74.     hide button 2
  75.   else
  76.     hide button 3
  77.     show button 6
  78.   end if
  79.  
  80.   hide card field 1
  81.   hide card field 2
  82.   Update
  83.   if post=1 then
  84.     visual effect iris open
  85.     go to card "Goal Post"
  86.   end if
  87.   if kick=1 then
  88.     wait for 1 second
  89.     visual effect scroll down
  90.     go to card "KICK OFF"
  91.   end if
  92.   if qtr=6 then
  93.     visual effect dissolve slow
  94.     go to card "Game Over"
  95.   end if
  96.  
  97. end Runplay
  98.  
  99. on Setup
  100.   global ty,td,sf,pen,dwn,time,ptime,qtr,yop,kick,dir,ofns,team1,mdw
  101.   global score1,score2,play,ds,name1,name2,t1p,t1r,t2p,t2r,lastdef
  102.   global defcnt
  103.  
  104.   put 250 into ds
  105.   put "KICK OFF!" into play
  106.   put 0 into ofns
  107.   if dir=0 then put 65 into ty
  108.   else put 35 into ty
  109.  
  110.   put 0 into lastdef
  111.   put 0 into defcnt
  112.   put 0 into t1p
  113.   put 0 into t1r
  114.   put 0 into t2p
  115.   put 0 into t2r
  116.   put 0 into dwn
  117.   put 0 into mdw
  118.   put 900 into time
  119.   put 0 into ptime
  120.   put 1 into qtr
  121.   put 1 into yop
  122.   put 1 into kick
  123.   visual effect dissolve slow
  124.   go to card 5
  125.   put score1 into card field 6
  126.   put score2 into card field 7
  127.   put name1 into card field 8
  128.   put name2 into card field 9
  129.   put qtr into card field 14
  130.   set dragSpeed to ds
  131.   Runplay
  132. end Setup
  133.  
  134. on Drawball
  135.   global ty
  136.  
  137.   XFootball (ty*3)+106,(ty*3)+106
  138. end Drawball
  139.  
  140. on Cointoss
  141.   global coin, players, coinres, team1, startt
  142.  
  143.   show card button 2
  144.   show card button 3
  145.   put the random of 10 into toss
  146.   if toss<=5 and coin is true or toss>5 and coin is false then
  147.     put true into coinres
  148.     show card field 3
  149.   end if
  150.  
  151.   if toss<=5 and coin is false or toss>5 and coin is true then
  152.     put false into coinres
  153.     show card field 4
  154.     if players=1 then
  155.       click at the location of card button 2
  156.       click at the location of card button 5
  157.       put true into team1
  158.       put true into startt
  159.       put 0 into dir
  160.     end if
  161.   end if
  162. end Cointoss
  163.  
  164. on Teamnames
  165.   global players, name1, name2, coinres, comp
  166.  
  167.   wait for 1 second
  168.   if players=1 then
  169.     if coinres is true then
  170.       ask "What is your team's name?"
  171.       put it into name1
  172.       put "Macintosh" into name2
  173.       put false into comp
  174.     else
  175.       ask "What is your team's name?"
  176.       put it into name2
  177.       put "Macintosh" into name1
  178.       put true into comp
  179.     end if
  180.   else
  181.     ask "Please name the team who won the toss:"
  182.     put it into name1
  183.     ask "Please name the team who lost the toss:"
  184.     put it into name2
  185.   end if
  186.   wait for 1 second
  187.   Setup
  188. end Teamnames
  189.  
  190.  
  191. on Penalties
  192.   global ty, dwn, dir, yop, pen, drop, inc
  193.  
  194.   put 0 into pen
  195.   put the random of 100 into p
  196.   if p>=95 then
  197.     play "Refs Whistle"
  198.     put 0 into drop
  199.     put 0 into inc
  200.     put 0 into yop
  201.     put 1 into pen
  202.     put the random of 100 into q
  203.     if q>=50 and q<=100 then put 5 into yop
  204.     if q>=28 and q<50 then put 10 into yop
  205.     if q>=0 and q<28 then put 15 into yop
  206.     put the random of 100 into q
  207.     if q>50 then put (-yop) into yop
  208.     if q>75 then go to card "Ditka"
  209.     if yop=-5 and q>75 then play "Falsestart"
  210.     if (yop=10 or yop=-10) then play "Holding"
  211.     if yop=15 and q<25 then play "Roughing the Passer"
  212.     if dir=0 then
  213.       if ty<=15 and yop<0 then put trunc(-ty/2) into yop
  214.       if ty>=85 and yop>0 then put trunc((100-ty)/2) into yop
  215.     end if
  216.     if dir=1 then
  217.       if ty<=15 and yop>0 then put trunc(ty/2) into yop
  218.       if ty>=85 and yop<0 then put trunc(-(100-ty)/2) into yop
  219.     end if
  220.     put dwn-1 into dwn
  221.   end if
  222. end Penalties
  223.  
  224.  
  225. on Down
  226.   global dwn, dir, ty, fdown, team1,mdw
  227.  
  228.   if dwn=0 then
  229.     if dir=0 then
  230.       show card button 7
  231.       hide card button 8
  232.     else
  233.       show card button 8
  234.       hide card button 7
  235.     end if
  236.   end if
  237.  
  238.   if dir=0 then
  239.     if ty>=fdown then
  240.       put 0 into dwn
  241.       put 0 into mdw
  242.       if ty>=90 then put 100 into fdown
  243.       else put ty+10 into fdown
  244.     end if
  245.   else
  246.     if ty<=fdown then
  247.       put 0 into dwn
  248.       put 0 into mdw
  249.       if ty<=10 then put 0 into fdown
  250.       else put ty-10 into fdown
  251.     end if
  252.   end if
  253.   put dwn+1 into dwn
  254.   put mdw+1 into mdw
  255.   if dwn=5 then
  256.     put 1 into dwn
  257.     put 1 into mdw
  258.     if team1 is true then
  259.       put false into team1
  260.     else
  261.       put true into team1
  262.     end if
  263.     if dir=0 then
  264.       put ty-10 into fdown
  265.       put 1 into dir
  266.     else
  267.       put ty+10 into fdown
  268.       put 0 into dir
  269.     end if
  270.     if dir=0 then
  271.       show card button 7
  272.       hide card button 8
  273.     else
  274.       show card button 8
  275.       hide card button 7
  276.     end if
  277.   end if
  278. end Down
  279.  
  280. on Yardline
  281.   global ty, ydl, td, sf, dir
  282.  
  283.   put false into td
  284.   put false into sf
  285.   if ty>=100 and dir=0 then Touchdown
  286.   if ty<=0 and dir=1 then Touchdown
  287.   if ty>=100 and dir=1 then Safty
  288.   if ty<=0 and dir=0 then Safty
  289.   put ty into ydl
  290.   if ty>50 then put 100-ty into ydl
  291. end Yardline
  292.  
  293. on Placemarker
  294.   global ty, dir, dwn, dm,mdw, kick
  295.  
  296.   if mdw=1 and kick=0 then
  297.     if dir=0 then put (3*ty)+121 into dm
  298.     else put (3*ty)+92 into dm
  299.     set loc of button 10 to dm,97
  300.   end if
  301. end Placemarker
  302.  
  303. on Timer
  304.   global qtr, ptime, time, ty, dir,fdown,min,sec,kick,team1,startt,dm
  305.   global sec1, sec2, min1, min2, score1, score2
  306.  
  307.   put time-ptime into time
  308.   put trunc(time/60) into min
  309.   put (time/60-(min))*60 into sec
  310.   if time<0 then
  311.     play "Refs Whistle"
  312.     put "End of quarter" into card field 21
  313.     wait 1 second
  314.     put qtr+1 into qtr
  315.     if qtr=5 then
  316.       if score1=score2 then
  317.         put 5 into qtr
  318.       else
  319.         put 6 into qtr
  320.       end if
  321.     end if
  322.     XFootball (3*ty)+106,(3*(100-ty))+106
  323.     put 100-ty into ty
  324.     put 100-fdown into fdown
  325.     if dir=0 then put 1 into dir
  326.     else put 0 into dir
  327.     put 512-dm into dm
  328.     put dm into markH
  329.     set loc of button 10 to markH,97
  330.     if qtr=3 or qtr=5 then
  331.       if startt is true then put false into team1
  332.       else put true into team1
  333.       put 1 into kick
  334.       if dir=0 then put 65 into ty
  335.       else put 35 into ty
  336.     end if
  337.     put 900 into time
  338.     put trunc(time/60) into min
  339.     put (time/60-(min))*60 into sec
  340.     if qtr=2 or qtr=4 then Drawball
  341.     if qtr=5 then put "S" into card field 14
  342.     else put qtr into card field 14
  343.     if dir=0 then
  344.       show card button 7
  345.       hide card button 8
  346.     else
  347.       show card button 8
  348.       hide card button 7
  349.     end if
  350.   end if
  351.   put trunc((.01)+sec/10) into sec1
  352.   put sec-(10*sec1) into sec2
  353.   put trunc(min/10) into min1
  354.   put min-(10*min1) into min2
  355. end Timer
  356.  
  357. on Update
  358.   global ty, fdown, dwn, dir, ydl, score1, score2, name1, name2, team1
  359.   global td, qtr, min, sec, players, comp, def, yop, ofns, kick, pen
  360.   global sec1,sec2,min1,min2, play, post, ds, drop, inc, plytyp
  361.   global p
  362.  
  363.   put play into card field 21
  364.   if pen>0 then
  365.     show card field 10
  366.     show card field 11
  367.     put yop into card field 11
  368.     wait for 1 second
  369.     hide card field 10
  370.     hide card field 11
  371.   end if
  372.   if pen=0 then Turnovers
  373.   if (kick=0) then
  374.     if dir=0 then
  375.       put ty+yop into fty
  376.       put -drop into drop
  377.       put -inc into inc
  378.     else
  379.       put ty-yop into fty
  380.     end if
  381.     if fty<0 then put -5 into fty
  382.     if fty>100 then put 105 into fty
  383.     put (ty*3)+106 into s
  384.     put (fty*3)+106 into f
  385.     XFootball s,s+drop
  386.     if drop<>0 then wait 20 ticks
  387.     if inc<>0 then
  388.       XFootball s+drop,s-inc
  389.       put "Incomplete" into card field 21
  390.       wait 30 ticks
  391.       XFootball s-inc,s
  392.     else
  393.       XFootball s+drop,f
  394.       if p<7 and plytyp=1 and pen=0 then
  395.         put "Interference" into card field 21
  396.         play "PassInterference"
  397.       end if
  398.     end if
  399.     put fty into ty
  400.   end if
  401.   Yardline
  402.   Down
  403.   Placemarker
  404.   Timer
  405.   if ofns>97 then
  406.     if ofns=98 then put "TOUCHDOWN!!" into card field 21
  407.     if ofns=99 then put "SAFETY!!" into card field 21
  408.     wait 1 second
  409.   end if
  410.   put dwn into card field 3
  411.   put ydl into card field 5
  412.   if kick=0 then
  413.     put score1 into card field 6
  414.     put score2 into card field 7
  415.   end if
  416.   if team1 is true then
  417.     show card button 4
  418.     hide card button 5
  419.   else
  420.     show card button 5
  421.     hide card button 4
  422.   end if
  423.   put min1 & min2 && ":" && sec1 & sec2 into card field 13
  424.   if players=1 and comp is true then
  425.     if team1 is true then
  426.       show button 6
  427.       hide button 3
  428.     else
  429.       show button 3
  430.       hide button 6
  431.     end if
  432.   end if
  433.   if players=1 and comp is false then
  434.     if team1 is false then
  435.       show button 6
  436.       hide button 3
  437.     else
  438.       show button 3
  439.       hide button 6
  440.     end if
  441.   end if
  442.   put abs(ty-fdown) into card field 4
  443.   if fdown=100 or fdown=0 then put "G" into card field 4
  444.   put the random of 100 into mad
  445.   -- play "Madden-79"--
  446.   if mad<10 then
  447.     if plytyp=0 then
  448.       if mad<2 or mad>97 then play "Madden-79"
  449.       if mad>=2 and mad<4 then play "Madden-Bighole"
  450.       if mad>=4 and mad<5 then play "Madden-Block"
  451.       if mad>=5 and mad<7 then play "Madden-Boom"
  452.       if mad>=7 and mad<9 then play "Madden-Fbshould"
  453.       if mad>=9 and mad<10 then play "Madden1-5"
  454.     end if
  455.     if plytyp=1 then
  456.       if mad<2 or mad>97 then play "Madden-Ask"
  457.       if mad>=2 and mad<4 then play "Madden-Lookin"
  458.       if mad>=4 and mad<6 then play "Madden-Passprotect"
  459.       if mad>=6 and mad<8 then play "Madden-Pretty Good"
  460.       if mad>=8 and mad<10 then play "Madden-Tough"
  461.     end if
  462.   end if
  463. end Update
  464.  
  465. on Touchdown
  466.   global team1, score1, score2, ty, dir, td, kick, good, post,ofns
  467.   global intrcpt, qtr, play
  468.  
  469.   put the random of 4 into sndtd
  470.   if sndtd=1 then play "Touchdown"
  471.   if sndtd=2 then play "Touchdown2"
  472.   if sndtd=3 then play "Touchdown3"
  473.   if sndtd=4 then play "Touchdown4"
  474.   put "Touchdown" into play
  475.   put 98 into ofns
  476.   if qtr=5 then put 6 into qtr
  477.   put true into td
  478.   put 1 into kick
  479.   if dir=0 then
  480.     put 1 into dir
  481.     put 35 into ty
  482.   else
  483.     put 0 into dir
  484.     put 65 into ty
  485.   end if
  486.   if team1 is true then
  487.     put score1+6 into score1
  488.   else
  489.     put score2+6 into score2
  490.   end if
  491.   put the random of 99 into expnt
  492.   if expnt>=95 then
  493.     put 0 into epv
  494.     put false into good
  495.     put 1 into post
  496.   else
  497.     put 1 into epv
  498.     put true into good
  499.     put 1 into post
  500.   end if
  501.   if team1 is true then
  502.     put score1+epv into score1
  503.   else
  504.     put score2+epv into score2
  505.   end if
  506.  
  507.   if team1 is true then
  508.     put false into team1
  509.   else
  510.     put true into team1
  511.   end if
  512.  
  513.   wait for 1 second
  514.  
  515. end Touchdown
  516.  
  517. on Safty
  518.   global team1, score1, score2, ty, dir, td, kick, ofns, qtr, play
  519.  
  520.   put "Safty" into play
  521.   put 99 into ofns
  522.   if qtr=5 then put 6 into qtr
  523.   play "Refs Whistle"
  524.   if team1 is true then
  525.     put score2+2 into score2
  526.   else
  527.     put score1+2 into score1
  528.   end if
  529.  
  530.   if team1 is true then
  531.     put false into team1
  532.   else
  533.     put true into team1
  534.   end if
  535.  
  536.   if dir=0 then
  537.     put 1 into dir
  538.     put 20 into ty
  539.   else
  540.     put 0 into dir
  541.     put 80 into ty
  542.   end if
  543.   put true into td
  544.   put 1 into kick
  545. end Safty
  546.  
  547. on Turnovers
  548.   global plytyp, good, kick, onside, intrcpt
  549.  
  550.   put 0 into intrcpt
  551.   if good is true or kick=1 then exit Turnovers
  552.   put the random of 100 into t
  553.   if onside=1 then put 40 into max
  554.   else put 4 into max
  555.   if t<=max and plytyp=0 then Fumble
  556.   if t<=5 and plytyp=1 then Interception
  557.   put 0 into onside
  558. end Turnovers
  559.  
  560. on Fumble
  561.   global team1, ty, dir, td, dwn, yop
  562.   play "Fumble"
  563.   show card field 12
  564.   put the random of 20 into exyd
  565.   if exyd>=10 then put 4 into dwn
  566.   wait for 2 seconds
  567.   hide card field 12
  568. end Fumble
  569.  
  570.  
  571.  
  572. on FieldGoal
  573.  
  574.   global ty, dwn, dir, team1, score1, score2, good, yop, kick, ofns,post
  575.   global qtr, play, drop, inc
  576.  
  577.   put "Field Goal" into play
  578.   put 0 into drop
  579.   put 0 into inc
  580.   put 4 into ofns
  581.   put 0 into yop
  582.   if dir=0 then put 110-ty into dis
  583.   else put ty+10 into dis
  584.   put the random of 75 into prb
  585.   if prb>=dis and prb<=75 then
  586.     if qtr=5 then put 6 into qtr
  587.     put true into good
  588.     if team1 is true then
  589.       put score1+3 into score1
  590.       put false into team1
  591.     else
  592.       put score2+3 into score2
  593.       put true into team1
  594.     end if
  595.  
  596.     if dir=0 then
  597.       put 35 into ty
  598.       put 1 into dir
  599.     else
  600.       put 65 into ty
  601.       put 0 into dir
  602.     end if
  603.   end if
  604.  
  605.   if good is true then
  606.     put 1 into kick
  607.   end if
  608.   put 4 into dwn
  609.   put 1 into post
  610.  
  611. end FieldGoal
  612.  
  613.  
  614. on Interception
  615.  
  616.   global ty, dwn, dir, fdown, team1, ptime, fdown, yop, ofns, plytyp,mdw
  617.   global play, ds, drop, inc, intrcpt
  618.  
  619.   put "Interception" into play
  620.   put 0 into inc
  621.   put 0 into drop
  622.   put 0 into plytyp
  623.   put 1 into ofns
  624.   put 14 into ptime
  625.   put the random of 99 into kick
  626.   put the random of 99 into rtn
  627.   if kick >= 95 and kick <100 then put 55 into ko
  628.   if kick >= 90 and kick <95 then put 48 into ko
  629.   if kick >= 70 and kick <90 then put 34 into ko
  630.   if kick >= 40 and kick <70 then put 25 into ko
  631.   if kick <40 then put 16 into ko
  632.  
  633.   if rtn >= 97 and rtn <100 then put 100 into r
  634.   if rtn >= 94 and rtn <97 then put 65 into r
  635.   if rtn >= 89 and rtn <94 then put 47 into r
  636.   if rtn >= 75 and rtn <89 then put 33 into r
  637.   if rtn >= 65 and rtn <75 then put 25 into r
  638.   if rtn >= 30 and rtn <65 then put 16 into r
  639.   if rtn >= 15 and rtn <30 then put 9 into r
  640.   if rtn <15 then put 5 into r
  641.   go to card 5
  642.   set dragSpeed to ds
  643.   if dir=0 then
  644.     put ty+ko into fty
  645.     put -15 into dr
  646.   else
  647.     put ty-ko into fty
  648.     put 15 into dr
  649.   end if
  650.   if fty>100 then put 102 into fty
  651.   if fty<0 then put -2 into fty
  652.   XFootball (ty*3)+106,(ty*3)+106+dr
  653.   wait 20 ticks
  654.   XFootball (ty*3)+106+dr,(fty*3)+106
  655.   put fty into ty
  656.  
  657.   show card field 22
  658.   put 0 into dwn
  659.   put 0 into mdw
  660.   put r into yop
  661.   if dir=1 then
  662.     put ty+yop+10 into fdown
  663.   else
  664.     put ty-yop-10 into fdown
  665.   end if
  666.   if dir=0 then put 1 into dir
  667.   else put 0 into dir
  668.   if team1 is true then put false into team1
  669.   else put true into team1
  670.   wait 1 second
  671.   hide card field 22
  672.   if (dir=0 and ty+yop>=100) then put 1 into intrcpt
  673.   if (dir=1 and ty-yop<=0) then put 1 into intrcpt
  674.  
  675. end Interception
  676.  
  677. on Punt
  678.   global ty, dwn, dir, fdown, team1, ptime, fdown, yop, ofns, plytyp,mdw
  679.   global play, ds, drop, inc
  680.  
  681.   put "Punt" into play
  682.   put 0 into inc
  683.   put 0 into drop
  684.   put 0 into plytyp
  685.   put 1 into ofns
  686.   put 14 into ptime
  687.   put the random of 99 into kick
  688.   put the random of 99 into rtn
  689.   if kick >= 95 and kick <100 then put 65 into ko
  690.   if kick >= 90 and kick <95 then put 58 into ko
  691.   if kick >= 70 and kick <90 then put 44 into ko
  692.   if kick >= 40 and kick <70 then put 50 into ko
  693.   if kick <40 then put 47 into ko
  694.   if rtn >= 97 and rtn <100 then put 100 into r
  695.   if rtn >= 94 and rtn <97 then put 30 into r
  696.   if rtn >= 89 and rtn <94 then put 25 into r
  697.   if rtn >= 75 and rtn <89 then put 7 into r
  698.   if rtn >= 65 and rtn <75 then put 15 into r
  699.   if rtn >= 30 and rtn <65 then put 0 into r
  700.   if rtn >= 15 and rtn <30 then put 5 into r
  701.   if rtn <15 then put 8 into r
  702.   go to card 5
  703.   if dir=0 then
  704.     put ty+ko into fty
  705.   else
  706.     put ty-ko into fty
  707.   end if
  708.   XFootball (ty*3)+106,(fty*3)+106
  709.   put fty into ty
  710.   put 0 into dwn
  711.   put 0 into mdw
  712.   put r into yop
  713.   if dir=1 then
  714.     if ty+yop<=0 then
  715.       put 19 into ty
  716.       put 1 into yop
  717.       XFootball 19,20
  718.     end if
  719.     put ty+yop+10 into fdown
  720.   else
  721.     if ty-yop>=100 then
  722.       put 81 into ty
  723.       put 1 into yop
  724.       XFootball 81,80
  725.     end if
  726.     put ty-yop-10 into fdown
  727.   end if
  728.   if dir=0 then put 1 into dir
  729.   else put 0 into dir
  730.   if team1 is true then put false into team1
  731.   else put true into team1
  732.   Runplay
  733. end Punt
  734.  
  735. on Runup
  736.   global team1, pen, yop, t1r, t2r
  737.   Penalties
  738.   if team1 is true then
  739.     if pen=0 then
  740.       put yop+t1r into t1r
  741.     end if
  742.   else
  743.     if pen=0 then
  744.       put yop+t2r into t2r
  745.     end if
  746.   end if
  747. end Runup
  748.  
  749. on Passup
  750.   global team1, pen, yop, t1p, t2p, inc, p, ty
  751.   Penalties
  752.   put the random of 100 into p
  753.   if p<7 and pen=0 then
  754.     put inc into yop
  755.     put 0 into inc
  756.     if yop<10 then put 22 into yop
  757.     if yop+ty>99 or ty-yop<1 then
  758.       put 100 into p
  759.       put yop into inc
  760.       put 0 into yop
  761.     end if
  762.   end if
  763.   if team1 is true then
  764.     if pen=0 then
  765.       put yop+t1p into t1p
  766.     end if
  767.   else
  768.     if pen=0 then
  769.       put yop+t2p into t2p
  770.     end if
  771.   end if
  772. end Passup
  773.  
  774.  
  775.